home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / systems / mac / oztex-german / OzTeX-1.4d.sit.bin / OzTeX 1.4 / TeX-inputs / SLITEX.TEX < prev    next >
Text File  |  1992-03-29  |  24KB  |  722 lines

  1. % SLITEX VERSION 2.09 <25 March 1992>
  2. % Copyright (C) 1992 by Leslie Lamport
  3.  
  4. \everyjob{\typeout{SliTeX Version 2.09 <25 March 1992>}}
  5. \immediate\write10{SliTeX Version 2.09 <25 March 1992>}
  6.  
  7. % NOTES FOR DEFINING FONTS AND STYLES FOR SLIDES
  8. %   Every font definition -- \rm, \it, etc. must \def\@currfont to itself.
  9. %   Every size definition such as \normalsize is defined to be
  10. %          \@normalsize
  11. %          \def\@currsize{\@normal}\rm
  12. %          commands to set:
  13. %             \baselineskip
  14. %             \lineskip
  15. %             the ...displayskip and ...displayshortskip parameters
  16. %             \strutbox
  17. %             \parskip and \@parskip
  18. %   where \@normal makes all the font definitions.
  19. %   \@normal must test the switch @visible and define its
  20. %   fonts equal to the visible or the invisible versions accordingly.
  21.  
  22. \message{hacks,}
  23. %      **********************************************
  24. %      *          HACKS FOR SLIDE MACROS            *
  25. %      **********************************************
  26. %
  27. % \@gobbletoend{FOO} gobbles all text up to and including the
  28. % next \end{FOO}.  Must be used inside an \if, right before the \fi.
  29.  
  30. \def\@gobbletoend#1{\def\@argend{#1}\@ggobtoend}
  31.  
  32. \long\def\@ggobtoend#1\end#2{\@xfi\def\@tempa{#2}%
  33. \ifx\@tempa\@argend\else\@ggobtoend\fi}
  34. \def\@xfi{\fi}
  35.  
  36. \message{slides,}
  37. %      **********************************************
  38. %      *               SLIDE  MACROS                *
  39. %      **********************************************
  40. %
  41. % Switches:
  42. % @bw      : true if making black and white slides
  43. % @visible : true if visible output to be produced.
  44. % @makingslides : true if executing \blackandwhite or \colorslides
  45.  
  46. \newif\if@bw
  47. \newif\if@visible
  48. \newif\if@onlyslidesw \@onlyslideswfalse
  49. \newif\if@onlynotesw  \@onlynoteswfalse
  50. \newif\if@makingslides
  51.  
  52. % Counters
  53. %  slide   = slide number
  54. %  overlay = overlay number for a slide
  55. %  note    = note number for a slide
  56.  
  57. \countdef\c@slide=0 \c@slide=0
  58. \def\cl@slide{}
  59. \countdef\c@overlay=1 \c@overlay=0
  60. \def\cl@overlay{}
  61. \countdef\c@note=2 \c@note=0
  62. \def\cl@note{}
  63.  
  64.  
  65. \@addtoreset{overlay}{slide}
  66. \@addtoreset{note}{slide}
  67.  
  68. % Redefine page counter to some other number.
  69. % The page counter will always be zero except when putting out an
  70. % extra page for a slide, note or overlay.
  71. %
  72. \@definecounter{page}
  73. \@addtoreset{page}{slide}
  74. \@addtoreset{page}{note}
  75. \@addtoreset{page}{overlay}
  76.  
  77.  
  78. \def\theslide{\@arabic\c@slide}
  79. \def\theoverlay{\theslide-\@alph\c@overlay}
  80. \def\thenote{\theslide-\@arabic\c@note}
  81.  
  82. % \@setlimits \LIST \LOW \HIGH
  83. %
  84. %    Assumes that \LIST = RANGE1,RANGE2,...,RANGEn  (n>0)
  85. %    Where RANGEi = j or j-k.
  86. %
  87. %    Then \@setlimits  globally sets
  88. %        (i) \LIST := RANGE2, ... , RANGEn
  89. %       (ii) \LOW  := p
  90. %      (iii) \HIGH := q
  91. %   where either RANGE1 = p-q   or  RANGE1 = p  and  q=p.
  92.  
  93. \def\@sl@getargs#1-#2-#3\relax#4#5{\xdef#4{#1}\xdef#5{#2}}
  94. \def\@sl@ccdr#1,#2\relax#3#4{\xdef#3{#1-#1-}\xdef#4{#2}}
  95.  
  96. \def\@setlimits #1#2#3{\expandafter\@sl@ccdr#1\relax\@sl@gtmp #1%
  97. \expandafter\@sl@getargs\@sl@gtmp\relax#2#3}
  98.  
  99. % \onlyslides{LIST} ::=
  100. %  BEGIN
  101. %    @onlyslidesw := true
  102. %    \@doglslidelist :=G LIST,999999,999999
  103. %   if @onlynotesw = true
  104. %     else @onlynotesw := true
  105. %          \@doglnotelist :=G LIST,999999,999999
  106. %   fi
  107. %   message: Only Slides LIST
  108. %  END
  109.  
  110. \def\onlyslides#1{\@onlyslideswtrue\gdef\@doglslidelist{#1,999999,999999}%
  111. \if@onlynotesw \else \@onlynoteswtrue\gdef\@doglnotelist{999999,999999}\fi
  112. \typeout{Only Slides #1}}
  113.  
  114. % \onlynotes{LIST} ::=
  115. %  BEGIN
  116. %    @onlynotesw := true
  117. %    \@doglnotelist :=G LIST,999999,999999
  118. %   if @onlyslidesw = true
  119. %     else \@onlyslidesw := true
  120. %          \@doglslidelist{999999,999999}
  121. %   fi
  122. %   message: Only Notes LIST
  123. %  END
  124.  
  125. \def\onlynotes#1{\@onlynoteswtrue\gdef\@doglnotelist{#1,999999,999999}%
  126. \if@onlyslidesw \else \@onlyslideswtrue\gdef\@doglslidelist{999999,999999}\fi
  127. \typeout{Only Notes #1}}
  128.  
  129.  
  130. % \blackandwhite #1  ::=
  131. %    \newpage
  132. %    page counter := 0
  133. %    @bw := T
  134. %    @visible := T
  135. %    if @onlyslidesw = true
  136. %      then  \@doslidelist := \@doglslidelist
  137. %            \@setlimits\@doslidelist\@doslidelow\@doslidehigh
  138. %    fi
  139. %    if @onlynotesw = true
  140. %      then  \@donotelist := \@doglnotelist
  141. %            \@setlimits\@donotelist\@donotelow\@donotehigh
  142. %    fi
  143. %    \normalsize    % Note, this sets font to \rm , which sets
  144. %                     % \@currfont to \rm
  145. %    counter slidenumber := 0
  146. %    counter note        := 0
  147. %    counter overlay     := 0
  148. %    @makingslides       := T
  149. %    input #1
  150. %    @makingslides       := F
  151.  
  152. \def\blackandwhite#1{\newpage\setcounter{page}{0}\@bwtrue\@visibletrue
  153. \if@onlyslidesw \xdef\@doslidelist{\@doglslidelist}%
  154. \@setlimits\@doslidelist\@doslidelow\@doslidehigh\fi
  155. \if@onlynotesw \xdef\@donotelist{\@doglnotelist}%
  156. \@setlimits\@donotelist\@donotelow\@donotehigh\fi
  157. \normalsize\setcounter{slide}{0}\setcounter{overlay}{0}%
  158. \setcounter{note}{0}\@makingslidestrue\input #1\@makingslidesfalse}
  159.  
  160.  
  161. % \colors{COLORS} ::=
  162. %  for \@colortemp := COLORS
  163. %     do \csname \@colortemp \endcsname == \@color{\@colortemp} od
  164. %  if \@colorlist = empty
  165. %     then \@colorlist := COLORS
  166. %     else \@colorlist := \@colorlist , COLORS
  167. %  fi
  168. %
  169. \def\colors#1{\@for\@colortemp:=#1\do{\expandafter
  170.   \xdef\csname\@colortemp\endcsname{\noexpand\@color{\@colortemp}}}\ifx
  171.   \@colorlist\@empty \gdef\@colorlist{#1}%
  172.     \else \xdef\@colorlist{\@colorlist,#1}\fi}
  173.  
  174. \def\@colorlist{}
  175.  
  176. % \colorslides{FILE} ::=
  177. %    \newpage
  178. %    page counter := 0
  179. %    @bw := F
  180. %    for \@currcolor := \@colorlist
  181. %      do  @visible := T
  182. %          if @onlyslidesw = true
  183. %            then  \@doslidelist := \@doglslidelist
  184. %                  \@setlimits\@doslidelist\@doslidelow\@doslidehigh
  185. %          fi
  186. %          if @onlynotesw = true
  187. %            then  \@donotelist := \@doglnotelist
  188. %                  \@setlimits\@donotelist\@donotelow\@donotehigh
  189. %          fi
  190. %          \normalsize
  191. %          counter slide := 0
  192. %          counter overlay := 0
  193. %          counter note    := 0
  194. %          type message
  195. %          generate color layer output page
  196. %          @makingslides := T
  197. %          input #1
  198. %          @makingslides := F
  199. %      od
  200.  
  201. \def\colorslides#1{\newpage\setcounter{page}{0}\@bwfalse
  202. \@for\@currcolor:=\@colorlist\do
  203. {\@visibletrue
  204. \if@onlyslidesw \xdef\@doslidelist{\@doglslidelist}%
  205. \@setlimits\@doslidelist\@doslidelow\@doslidehigh\fi
  206. \if@onlynotesw \xdef\@donotelist{\@doglnotelist}%
  207. \@setlimits\@donotelist\@donotelow\@donotehigh\fi
  208. \normalsize\setcounter{slide}{0}\setcounter{overlay}{0}%
  209. \setcounter{note}{0}\typeout{color \@currcolor}%
  210. \newpage
  211. \begin{huge}%
  212. \begin{center}%
  213. COLOR LAYER\\[.75in]%
  214. \@currcolor
  215. \end{center}%
  216. \end{huge}%
  217. \newpage
  218. \@makingslidestrue
  219. \input #1
  220. \@makingslidesfalse}}
  221.  
  222.  
  223. % \slide COLORS ::=
  224. %  BEGIN
  225. %   \stepcounter{slide}
  226. %   \@slidesw :=G T
  227. %   if @onlyslidesw = true                     % set \@slidesw = T iff page to
  228. %     then                                   % be output
  229. %       while \c@slide > \@doslidehigh
  230. %          do  \@setlimits\@doslidelist\@doslidelow\@doslidehigh  od
  231. %       if \c@slide < \@doslidelow
  232. %         then \@slidesw := F
  233. %       fi
  234. %   fi
  235. %   if \@slidesw = T
  236. %      then \@slidesw :=G F
  237. %           \begingroup
  238. %              if @bw = true
  239. %                then  \@slidesw :=G T
  240. %                else \@color{COLORS}
  241. %                     \if@visible then \@slidesw :=G T \fi
  242. %              fi
  243. %            \endgroup
  244. %  fi
  245. %  if \@slidesw = T
  246. %    then \newpage
  247. %         \thispagestyle{slide}
  248. %    else \end{slide}
  249. %          \@gobbletoend{slide}
  250. %  fi
  251. % END
  252.  
  253. % \endslide ::=
  254. %  BEGIN
  255. %    \par\break
  256. %  END
  257.  
  258. \def\slide#1{\stepcounter{slide}\gdef\@slidesw{T}\if@onlyslidesw
  259. \@whilenum \c@slide >\@doslidehigh\relax
  260. \do{\@setlimits\@doslidelist\@doslidelow\@doslidehigh}\ifnum
  261. \c@slide <\@doslidelow\relax\gdef\@slidesw{F}\fi\fi
  262. \if\@slidesw T\gdef\@slidesw{F}\begingroup\if@bw\gdef\@slidesw{T}\else
  263. \@color{#1}\if@visible \gdef\@slidesw{T}\fi\fi\endgroup\fi
  264. \if\@slidesw T\newpage\thispagestyle{slide}%
  265. \else\end{slide}\@gobbletoend{slide}\fi}
  266.  
  267. \def\endslide{\par\break}
  268.  
  269. % \overlay COLORS ::=
  270. %  BEGIN
  271. %   \stepcounter{overlay}
  272. %   \@slidesw :=G T
  273. %   if @onlyslidesw = T                       % set \@slidesw = T iff page to
  274. %     then                                  % be output
  275. %       if \c@slide < \@doslidelow
  276. %         then \@slidesw :=G F
  277. %       fi
  278. %  fi
  279. %  if \@slidesw = T
  280. %    \@slidesw :=G F
  281. %    \begingroup
  282. %      if @bw = true
  283. %          then  \@slidesw :=G T
  284. %          else  \@color{COLORS}
  285. %                \if@visible then \@slidesw :=G T \fi
  286. %      fi
  287. %    \endgroup
  288. %  fi
  289. %  if \@slidesw = T
  290. %     then \newpage
  291. %          \thispagestyle{overlay}
  292. %     else \end{overlay}
  293. %          \@gobbletoend{overlay}
  294. %  fi
  295. % END
  296.  
  297. % \endoverlay ::=
  298. %  BEGIN
  299. %    \par\break
  300. %  END
  301.  
  302. \def\overlay#1{\stepcounter{overlay}\gdef\@slidesw{T}%
  303. \if@onlyslidesw\ifnum \c@slide <\@doslidelow\relax
  304. \gdef\@slidesw{F}\fi\fi
  305. \if\@slidesw T\gdef\@slidesw{F}\begingroup\if@bw\gdef\@slidesw{T}%
  306. \else\@color{#1}\if@visible \gdef\@slidesw{T}\fi\fi\endgroup\fi
  307. \if\@slidesw T\newpage\thispagestyle{overlay}%
  308. \else\end{overlay}\@gobbletoend{overlay}\fi}
  309.  
  310. \def\endoverlay{\par\break}
  311.  
  312. % \note ::=
  313. %  BEGIN
  314. %   \stepcounter{note}
  315. %   if @bw = T
  316. %     then
  317. %       \@slidesw :=G T
  318. %       if @onlynotesw = true                  % set \@notesw = T iff page to
  319. %         then                                 % be output
  320. %           while \c@slide > \@donotehigh
  321. %              do  \@setlimits\@donotelist\@donotelow\@donotehigh  od
  322. %           if \c@slide < \@donotelow
  323. %             then \@slidesw :=G F
  324. %           fi
  325. %       fi
  326. %     else \@slidesw :=G F
  327. %  fi
  328. %  if \@slidesw = T
  329. %     then \newpage
  330. %          \thispagestyle{note}
  331. %     else \end{note}
  332. %          \@gobbletoend{note}
  333. %  fi
  334. % END
  335.  
  336. % \endnote ::=
  337. %  BEGIN
  338. %    \par\break
  339. %  END
  340.  
  341. \def\note{\stepcounter{note}%
  342. \if@bw \gdef\@slidesw{T}\if@onlynotesw\@whilenum \c@slide >\@donotehigh\relax
  343. \do{\@setlimits\@donotelist\@donotelow\@donotehigh}\ifnum
  344. \c@slide <\@donotelow\relax \gdef\@slidesw{F}\fi\fi
  345. \else\gdef\@slidesw{F}\fi
  346. \if\@slidesw T\newpage\thispagestyle{note}\else
  347. \end{note}\@gobbletoend{note}\fi}
  348.  
  349. \def\endnote{\par\break}
  350.  
  351.  
  352. % \@color{COLORS} ::=
  353. %  BEGIN
  354. %   if math mode
  355. %     then type warning
  356. %   fi
  357. %   if @bw
  358. %     then @visible := T
  359. %     else @visible := F
  360. %         for \@tempa := COLORS
  361. %          do if \@tempa = \@currcolor
  362. %               then @visible := T
  363. %             fi
  364. %          od
  365. %   fi
  366. %   \@currsize -- sets the visibility of the current size
  367. %   \@currfont -- sets the visibility of the current font
  368. %   \ignorespaces
  369. % END
  370.  
  371. \def\@color#1{\@mmodetest{
  372. \if@bw \@visibletrue\else\@visiblefalse
  373.   \@for \@tempa :=#1\do{\ifx\@tempa\@currcolor\@visibletrue\fi}\fi
  374.   \@currsize\@currfont\ignorespaces}}
  375.  
  376. \def\@mmodetest#1{\ifmmode\@warning{Color-changing command
  377.        in math mode has been ignored}\else #1\fi}
  378.  
  379. % \invisible ::= BEGIN type warning if math mode
  380. %                      \@visiblefalse \@currsize\@currfont\ignorespaces END
  381.  
  382. \def\invisible{\@mmodetest{\@visiblefalse\@currsize\@currfont\ignorespaces}}
  383.  
  384. \let\invisible=\invisible
  385. \let\endinvisible=\relax
  386.  
  387. % \visible ::= BEGIN type warning if math mode
  388. %                      \@visibletrue \@currsize\@currfont\ignorespaces END
  389. %
  390. %\def\visible{\@mmodetest{\@visibletrue\@currsize\@currfont\ignorespaces}}
  391. %
  392. %\let\visible=\visible
  393. %\let\endvisible=\relax
  394.  
  395. \message{picture,}
  396. %      ****************************************
  397. %      *          MODIFICATIONS TO            *
  398. %      *       THE PICTURE ENVIRONMENT        *
  399. %      ****************************************
  400. %
  401. %  Below are the new definitions of the picture-drawing macros
  402. %  required for SLiTeX.  Only those commands that actually
  403. %  draw something must be changed so that they do not produce
  404. %  any output when the @visible switch is false.
  405.  
  406. \def\line(#1,#2)#3{\if@visible\@xarg #1\relax \@yarg #2\relax
  407. \@linelen #3\unitlength
  408. \ifnum\@xarg =\z@ \@vline
  409.   \else \ifnum\@yarg =\z@ \@hline \else \@sline\fi
  410. \fi\fi}
  411.  
  412. \def\vector(#1,#2)#3{\if@visible\@xarg #1\relax \@yarg #2\relax
  413. \@linelen #3\unitlength
  414. \ifnum\@xarg =\z@ \@vvector
  415.   \else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi
  416. \fi\fi}
  417.  
  418. \def\dashbox#1(#2,#3){\leavevmode\if@visible\hbox to \z@{\baselineskip \z@
  419. \lineskip \z@
  420. \@dashdim #2\unitlength
  421. \@dashcnt \@dashdim \advance\@dashcnt 200
  422. \@dashdim #1\unitlength\divide\@dashcnt \@dashdim
  423. \ifodd\@dashcnt\@dashdim \z@
  424. \advance\@dashcnt \@ne \divide\@dashcnt \tw@
  425. \else \divide\@dashdim \tw@ \divide\@dashcnt \tw@
  426. \advance\@dashcnt \m@ne
  427. \setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
  428. \@width \@dashdim}\put(0,0){\copy\@dashbox}%
  429. \put(0,#3){\copy\@dashbox}%
  430. \put(#2,0){\hskip-\@dashdim\copy\@dashbox}%
  431. \put(#2,#3){\hskip-\@dashdim\box\@dashbox}%
  432. \multiply\@dashdim \thr@@
  433. \fi
  434. \setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
  435. \@width #1\unitlength\hskip #1\unitlength}\@tempcnta\z@
  436. \put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
  437. \do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@
  438. \put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
  439. \do{\copy\@dashbox\advance\@tempcnta \@ne }}%
  440. \@dashdim #3\unitlength
  441. \@dashcnt \@dashdim \advance\@dashcnt 200
  442. \@dashdim #1\unitlength\divide\@dashcnt \@dashdim
  443. \ifodd\@dashcnt \@dashdim\z@
  444. \advance\@dashcnt \@ne \divide\@dashcnt \tw@
  445. \else
  446. \divide\@dashdim \tw@ \divide\@dashcnt \tw@
  447. \advance\@dashcnt \m@ne
  448. \setbox\@dashbox\hbox{\hskip -\@halfwidth
  449. \vrule \@width \@wholewidth
  450. \@height \@dashdim}\put(0,0){\copy\@dashbox}%
  451. \put(#2,0){\copy\@dashbox}%
  452. \put(0,#3){\lower\@dashdim\copy\@dashbox}%
  453. \put(#2,#3){\lower\@dashdim\copy\@dashbox}%
  454. \multiply\@dashdim \thr@@
  455. \fi
  456. \setbox\@dashbox\hbox{\vrule \@width \@wholewidth
  457. \@height #1\unitlength}\@tempcnta\z@
  458. \put(0,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt
  459. \do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
  460. \vskip\@dashdim}}\@tempcnta\z@
  461. \put(#2,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt
  462. \relax\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
  463. \vskip\@dashdim}}}\fi\@makepicbox(#2,#3)}
  464.  
  465. \def\@oval(#1,#2)[#3]{\if@visible\begingroup \boxmaxdepth \maxdimen
  466.   \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
  467.   \@tfor\@tempa :=#3\do{\csname @ov\@tempa false\endcsname}\@ovxx
  468.   #1\unitlength \@ovyy #2\unitlength
  469.   \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx\else \@ovyy \fi
  470.   \@getcirc \@tempdimb
  471.   \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa
  472.   \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@
  473.   \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@
  474.   \@circlefnt \setbox\@tempboxa
  475.   \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi
  476.   \if@ovl \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx \fi
  477.   \if@ovt \@ovhorz \kern -\@ovxx \fi
  478.   \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro
  479.   \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
  480.   \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
  481.   \endgroup\fi}
  482.  
  483. \def\@circle#1{\if@visible \begingroup \boxmaxdepth \maxdimen
  484.    \@tempdimb #1\unitlength
  485.    \ifdim \@tempdimb >15.5\p@\relax \@getcirc\@tempdimb
  486.       \@ovro\ht\@tempboxa
  487.      \setbox\@tempboxa\hbox{\@circlefnt
  488.       \advance\@tempcnta\tw@ \char \@tempcnta
  489.       \advance\@tempcnta\m@ne \char \@tempcnta \kern -2\@tempdima
  490.       \advance\@tempcnta\tw@
  491.       \raise \@tempdima \hbox{\char\@tempcnta}\raise \@tempdima
  492.         \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@
  493.       \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}%
  494.    \else  \@circ\@tempdimb{96}\fi\endgroup\fi}
  495.  
  496. \def\@dot#1{\if@visible\@tempdimb #1\unitlength \@circ\@tempdimb{112}\fi}
  497.  
  498. \long\def\@iframebox[#1][#2]#3{\leavevmode
  499.   \savebox\@tempboxa[#1][#2]{\kern\fboxsep #3\kern\fboxsep}\@tempdima\fboxrule
  500.     \advance\@tempdima \fboxsep \advance\@tempdima \dp\@tempboxa
  501.    \hbox{\lower \@tempdima\hbox
  502.   {\vbox{ \if@visible \hrule \@height \else \vskip \fi \fboxrule
  503.           \hbox{\if@visible \vrule \@width \fboxrule \hskip-\fboxrule \fi
  504.                 \vbox{\vskip\fboxsep \box\@tempboxa\vskip\fboxsep}\if@visible
  505.                 \vrule \@width \fboxrule \hskip-\fboxrule \fi}\if@visible
  506.          \hrule \@height \else \vskip\fi\fboxrule}}}}
  507.  
  508.  
  509. \long\def\frame#1{\if@visible\leavevmode
  510. \vbox{\vskip-\@halfwidth\hrule \@height\@halfwidth \@depth \@halfwidth
  511.   \vskip-\@halfwidth\hbox{\hskip-\@halfwidth \vrule \@width\@wholewidth
  512.   \hskip-\@halfwidth #1\hskip-\@halfwidth \vrule \@width \@wholewidth
  513.   \hskip -\@halfwidth}\vskip -\@halfwidth\hrule \@height \@halfwidth
  514.   \@depth \@halfwidth\vskip -\@halfwidth}\else #1\fi}
  515.  
  516. \long\def\fbox#1{\leavevmode\setbox\@tempboxa\hbox{#1}\@tempdima\fboxrule
  517.     \advance\@tempdima \fboxsep \advance\@tempdima \dp\@tempboxa
  518.    \hbox{\lower \@tempdima\hbox
  519.   {\vbox{\if@visible \hrule \@height \else \vskip\fi\fboxrule
  520.           \hbox{\if@visible\vrule \@width \else \hskip \fi\fboxrule
  521.                  \hskip\fboxsep
  522.             \vbox{\vskip\fboxsep \box\@tempboxa\vskip\fboxsep}\hskip
  523.                    \fboxsep \if@visible\vrule \@width\else\hskip \fi\fboxrule}%
  524.           \if@visible\hrule \@height \else \vskip \fi\fboxrule}}}}
  525.  
  526. \message{mods,}
  527. %      ****************************************
  528. %      *        OTHER MODIFICATIONS TO        *
  529. %      *        TeX AND LaTeX COMMANDS        *
  530. %      ****************************************
  531. %
  532.  
  533. % \rule
  534.  
  535. \def\@rule[#1]#2#3{\@tempdima#3\advance\@tempdima #1\leavevmode
  536.  \hbox{\if@visible\vrule
  537.   \@width#2 \@height\@tempdima \@depth-#1\else
  538. \vrule \@width \z@ \@height\@tempdima \@depth-#1\vrule
  539.  \@width#2 \@height\z@\fi}}
  540.  
  541. % \_  (Added 10 Nov 86)
  542.  
  543. \def\_{\leavevmode \kern.06em \if@visible\vbox{\hrule \@width.3em}\else
  544.    \vbox{\hrule \@height \z@ \@width.3em}\vbox{\hrule \@width \z@}\fi}
  545.  
  546. % \overline, \underline, \frac and \sqrt
  547. %
  548. % \@mathbox{STYLE}{BOX}{MTEXT} : Called in math mode, typesets MTEXT and
  549. %   stores result in BOX, using style STYLE.
  550. %
  551. % \@bphant{BOX}    : Creates a phantom with dimensions BOX.
  552. % \@vbphant{BOX}   : Creates a phantom with ht of BOX and zero width.
  553. % \@hbphant{BOX}   : Creates a phantom with width of BOX and zero ht & dp.
  554. % \@hvsmash{STYLE}{MTEXT} : Creates a copy of MTEXT with zero height and width
  555. %                           in style STYLE.
  556.  
  557. \def\@mathbox#1#2#3{\setbox#2\hbox{$\m@th#1{#3}$}}
  558.  
  559. \def\@vbphantom#1{\setbox\tw@\null \ht\tw@\ht #1\dp\tw@\dp #1%
  560.    \box\tw@}
  561.  
  562. \def\@bphantom#1{\setbox\tw@\null \wd\tw@\wd #1\ht\tw@\ht #1\dp\tw@\dp #1%
  563.    \box\tw@}
  564.  
  565. \def\@hbphantom#1{\setbox\tw@\null \wd\tw@\wd #1\ht\tw@\z@ \dp\tw@\z@
  566.    \box\tw@}
  567.  
  568. \def\@hvsmash#1#2{\@mathbox#1\z@{#2}\ht\z@\z@ \dp\z@\z@ \wd\z@\z@ \box\z@}
  569.  
  570. \def\underline#1{\relax\ifmmode
  571.   \@xunderline{#1}\else $\m@th\@xunderline{\hbox{#1}}$\relax\fi}
  572.  
  573. \def\@xunderline#1{\mathchoice{\@xyunderline\displaystyle{#1}}{\@xyunderline
  574.     \textstyle{#1}}{\@xyunderline\scriptstyle{#1}}{\@xyunderline
  575.       \scriptscriptstyle{#1}}}
  576.  
  577. \def\@xyunderline#1#2{\@mathbox#1\@smashboxa{#2}\@hvsmash#1{\copy\@smashboxa}%
  578.    \if@visible \@hvsmash#1{\@@underline{\@bphantom\@smashboxa}}\fi
  579.   \@mathbox#1\@smashboxb{\@@underline{\box\@smashboxa}}%
  580.    \@bphantom\@smashboxb}
  581.  
  582. \let\@@overline=\overline
  583.  
  584. \def\overline#1{\mathchoice{\@xoverline\displaystyle{#1}}{\@xoverline
  585.     \textstyle{#1}}{\@xoverline\scriptstyle{#1}}{\@xoverline
  586.       \scriptscriptstyle{#1}}}
  587.  
  588. \def\@xoverline#1#2{\@mathbox#1\@smashboxa{#2}\@hvsmash#1{\copy\@smashboxa}%
  589.    \if@visible \@hvsmash#1{\@@overline{\@bphantom\@smashboxa}}\fi
  590.    \@mathbox#1\@smashboxb{\@@overline{\box\@smashboxa}}%
  591.    \@bphantom\@smashboxb}
  592.  
  593.  
  594. % \@frac {STYLE}{DENOMSTYLE}{NUM}{DEN}{FONTSIZE} : Creates \frac{NUM}{DENOM}
  595. %   in style STYLE with NUM and DENOM in style DENOMSTYLE
  596. %   FONTSIZE should be \textfont \scriptfont or \scriptscriptfont
  597.  
  598. \def\frac#1#2{\mathchoice
  599.    {\@frac\displaystyle\textstyle{#1}{#2}\textfont}{\@frac
  600.           \textstyle\scriptstyle{#1}{#2}\textfont}{\@frac
  601.           \scriptstyle\scriptscriptstyle{#1}{#2}\scriptfont}{\@frac
  602.           \scriptscriptstyle\scriptscriptstyle{#1}{#2}\scriptscriptfont}}
  603.  
  604. \def\@frac#1#2#3#4#5{\@mathbox#2\@smashboxa{#3}\@mathbox#2\@smashboxb{#4}%
  605.    \@mathbox#1\@smashboxc{\copy\@smashboxa\over\copy\@smashboxb}%
  606.    \@vbphantom\@smashboxc
  607.    \vcenter{\vbox to\z@{\hsize \wd\@smashboxc
  608.                          \vss\nointerlineskip
  609.                          \hbox to\wd\@smashboxc{\hss\box\@smashboxa\hss}%
  610.               \hrule \@height \z@}%
  611.           \vskip 7\fontdimen8#53
  612.           \if@visible\hrule \@height \fontdimen8#53\else \vskip \fontdimen8#53\fi
  613.           \vskip 7\fontdimen8#53
  614.           \nointerlineskip
  615.           \vbox to\z@{\nointerlineskip
  616.                          \hbox to\wd\@smashboxc{\hss\box\@smashboxb\hss}%
  617.               \hrule \@height \z@\vss}%
  618.            }}
  619.  
  620. \def\r@@t#1#2{\setbox\z@\hbox{$\m@th#1\@xysqrt#1{#2}$}%
  621.   \dimen@\ht\z@ \advance\dimen@-\dp\z@
  622.   \mskip5mu\raise.6\dimen@\copy\rootbox \mskip-10mu\box\z@}
  623.  
  624. \def\sqrt{\@ifnextchar[{\@sqrt}{\@xsqrt}}
  625. \def\@sqrt[#1]{\root #1\of}
  626. \def\@xsqrt#1{\mathchoice{\@xysqrt\displaystyle{#1}}{\@xysqrt
  627.      \textstyle{#1}}{\@xysqrt\scriptstyle{#1}}{\@xysqrt
  628.     \scriptscriptstyle{#1}}}
  629. \def\@xysqrt#1#2{\@mathbox#1\@smashboxa{#2}\if@visible
  630.     \@hvsmash#1{\@@sqrt{\@bphantom\@smashboxa}}\fi
  631.     \phantom{\@@sqrt{\@vbphantom\@smashboxa}}\box\@smashboxa}
  632.  
  633. \newbox\@smashboxa
  634. \newbox\@smashboxb
  635. \newbox\@smashboxc
  636.  
  637. % array and tabular environments: changes to `|', \hline, \cline, and \vline
  638. % added 8 Jun 88
  639.  
  640. \def\@arrayrule{\if@visible\@addtopreamble{\hskip -.5\arrayrulewidth
  641.    \vrule \@width \arrayrulewidth\hskip -.5\arrayrulewidth}\fi}
  642.  
  643. \def\cline#1{\if@visible\@cline[#1]\fi}
  644.  
  645.  
  646. \def\hline{\noalign{\ifnum0=`}\fi
  647.     \if@visible \hrule \@height \arrayrulewidth
  648.       \else \hrule \@width \z@
  649.     \fi
  650.     \futurelet \@tempa\@xhline}
  651.  
  652.  
  653. \def\vline{\if@visible \vrule \@width \arrayrulewidth
  654.             \else \vrule \@width \arrayrulewidth \@height \z@
  655.            \@depth \z@ \fi}
  656.  
  657.  
  658. \message{output,}
  659. %      ****************************************
  660. %      *   CHANGES TO LaTeX \output ROUTINE   *
  661. %      ****************************************
  662. %
  663. %  \@makecol ==
  664. %    BEGIN
  665. % % Following test added for slides to check if extra page
  666. %     if @makingslides = T
  667. %     then if \c@page > 0
  668. %             then if \c@note > 0
  669. %                     then type 'Note \thenote too long.'
  670. %                     else if \c@overlay > 0
  671. %                            then type 'Overlay \theoverlay too long.'
  672. %                            else type 'Slide \theslide too long'
  673. %     fi     fi     fi     fi
  674. %     ifvoid \insert\footins
  675. %        then  \@outputbox := \box255
  676. %        else  \@outputbox := \vbox {\unvbox255
  677. %                                    \vskip \skip\footins
  678. %                                    \footnoterule
  679. %                                    \unvbox\@footinsert
  680. %                                   }
  681. %    fi
  682. %    \@freelist :=G \@freelist * \@midlist
  683. %    \@midlist  :=G empty
  684. %    \@combinefloats
  685. %    \@outputbox := \vbox to \@colht{\boxmaxdepth := \maxdepth
  686. %                                     \vfil     %%\vfil added for slides
  687. %                                     \unvbox\@outputbox
  688. %                                     \vfil }   %%\vfil added for slides
  689. %    \maxdepth :=G \@maxdepth
  690. %    END
  691.  
  692. \def\@makecol{\if@makingslides\ifnum\c@page>\z@ \@extraslide\fi\fi
  693. \ifvoid\footins \setbox\@outputbox\box\@cclv \let\@botfil\vfil
  694.    \else\let\@botfil\relax\setbox\@outputbox
  695.      \vbox{\unvbox\@cclv\vfil
  696.            \vskip\skip\footins\footnoterule\unvbox\footins\vskip
  697.             \z@ plus.1fil\relax}\fi
  698.   \xdef\@freelist{\@freelist\@midlist}\gdef\@midlist{}\@combinefloats
  699.      \setbox\@outputbox\vbox to\@colht{\boxmaxdepth\maxdepth
  700.         \vfil\unvbox\@outputbox\@botfil}\global\maxdepth\@maxdepth}
  701.  
  702. \def\@extraslide{\ifnum\c@note>\z@
  703.     \@warning{Note \thenote\space too long}\else
  704.      \ifnum\c@overlay>\z@
  705.         \@warning{Overlay \theoverlay\space too long}\else
  706.         \@warning{Slide \theslide\space too long}\fi\fi}
  707.  
  708. \message{init}
  709. %      ****************************************
  710. %      *    SPECIAL SLiTeX INITIALIZATIONS    *
  711. %      ****************************************
  712. %
  713. \nofiles
  714. \@visibletrue
  715.  
  716. %% RmS 91/09/29: \SLiTeX logo removed since it is now defined in latex.tex.
  717.  
  718. %\def\SLiTeX{{\rm S\kern-.06em{\sc l\kern-.035emi}\kern-.06em T\kern
  719. %   -.1667em\lower.7ex\hbox{E}\kern-.125emX}}
  720.  
  721. \endinput
  722.